
<meta charset="utf-8">
<script>
    var word = prompt("请输入英文");
    if(word=="pig"){
        document.write("<h1>猪</h1>");
    }
    if(word=="dog"){
        document.write("<h1>狗</h1>");
    }
    if(word=="cat"){
        document.write("<h1>猫</h1>");
    }
   
</script>